package com.suntine.familytree.businessunit.login.assistant;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.roo.addon.javabean.RooJavaBean;
/**
 * @corporation 
 * @author suntine
 * @creation 2011-3-30 下午01:13:42
 * @description 
 */
@RooJavaBean
public class LoginForm {
		
		@NotEmpty(message="请输入账号")
		private String userId;
		
		@NotEmpty(message="请输入密码")
		private String userPassword;
		
		public String getUserId() {
			return userId;
		}
		public void setUserId(String userId) {
			this.userId = userId.trim();
		}
		public String getUserPassword() {
			return userPassword;
		}
		public void setUserPassword(String userPassword) {
			this.userPassword = userPassword.trim();
		}
		
		public String toString(){
			StringBuilder sb = new StringBuilder();
			
	        sb.append("properties userId=");
	        if (userId != null) {
	        	sb.append("'").append(userId).append("', ");
	        } else {
	        	sb.append(userId).append(", ");
	        }
	        
	        sb.append("userPassword=");
	        if (userPassword != null) {
	        	sb.append("'").append(userPassword).append("', ");
	        } else {
	        	sb.append(userPassword).append(", ");
	        }
	        
	        return sb.toString();
		}
	
}
